﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="JustImage.aspx.cs" Inherits="WebApplicationRating.Views.JustImage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Button ID="btnBack" runat="server" style="margin-left: 350px" onclick="btnBack_Click" Text="Back" />&nbsp;&nbsp;
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="imageid" DataSourceID="SqlDataSource1">
 <Columns>
 <asp:BoundField DataField="imageid" HeaderText="imageid" InsertVisible="False" ReadOnly="True" SortExpression="imageid" />
 <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
 <asp:TemplateField HeaderText="Image">
 <ItemTemplate>
   <asp:Image ID="Image1" runat="server" ImageUrl='<%# "Handler.ashx?imageid=" + Eval("imageid")%>' Width = "400" />
  </ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:imageConnectionString %>"    
        SelectCommand="SELECT imageid, name, image_file FROM Image WHERE (imageid = @imageid)">
       <SelectParameters>
             <asp:ControlParameter ControlID="tbMGID" Name="imageid" PropertyName="Text" />
       </SelectParameters>
    </asp:SqlDataSource>
<br />
<asp:TextBox ID="tbMGID" runat="server" Width="2px" Enabled="false" Visible="false" style="margin-left: 30px"></asp:TextBox>
<br />
<asp:Label ID="lblMessageM" runat="server" Text=" "></asp:Label>
<br />
</asp:Content>